package com.corpgovernment.permission.entity.db;

import com.corpgovernment.common.annotation.OperateLogFieldDesc;
import com.corpgovernment.common.entity.db.BaseEntity;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * 用户角色关系
 *
 * @author wangyujue
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@Table(name = "mb_user_role")
@AllArgsConstructor
@NoArgsConstructor
public class MbUserRole extends BaseEntity {

    /**
     * 角色
     */
    @Column(name = "role_id")
    @OperateLogFieldDesc(value = "角色")
    private Long roleId;

    /**
     * 用户
     */
    @Column(name = "uid")
    @OperateLogFieldDesc(value = "用户")
    private String uid;

    @Column(name = "org_id")
    @OperateLogFieldDesc(value = "用户所属的组织ID")
    private String orgId;


    // 员工
    @Transient
    private String empName;
    @Transient
    private String empOrgId;
    @Transient
    private String empOrgName;
    @Transient
    private String empMobilePhone;
    @Transient
    private String empAreaCode;
    @Transient
    private String empEmail;
    @Transient
    private Boolean reconciliationEmail;
    @Transient
    private String empValid;
    @Transient
    private Date empDeleteTime;

    // 角色
    @Transient
    private String roleName;
    @Transient
    private String roleDescription;
    @Transient
    private String roleOrgId;
    @Transient
    private String roleOrgName;

    // 账户
    @Transient
    private String loginAccountName;
    @Transient
    private String loginPwd;
    @Transient
    private String loginUserName;
	@Transient
	private Boolean isRecManager;
}
